from flask import Flask
from extens import db
from user_common import user_bp
from feeds import feeds_bp
from live import live_bp

import config


def create_app():
    app = Flask(__name__)
    app.config.from_object(config)
    db.init_app(app)
    app.register_blueprint(feeds_bp)
    app.register_blueprint(user_bp)
    app.register_blueprint(live_bp)
    return app


app = create_app()


@app.route('/')
def hello_world():
    return 'hello word'


if __name__ == '__main__':
    app.run(host='0.0.0.0')
